# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

pkgname=fcitx5-unikey
pkgver=5.0.13
pkgrel=1
pkgdesc="Unikey engine support for Fcitx5"
arch=('loong64' 'x86_64')
url="https://github.com/fcitx/fcitx5-unikey"
license=('GPL')
depends=('fcitx5-qt')
makedepends=('extra-cmake-modules' 'ninja')
source=("https://download.fcitx-im.org/fcitx5/$pkgname/$pkgname-$pkgver.tar.xz"{,.sig})
sha512sums=('5865e873814a2f2f15b0e7d9350a5a32aac8af9f3f8a08eb74df85d86bae6324422e493d44d945d2b15063f65f743344a855be75ccc12bf78c4e11e1b12ba439'
            'SKIP')
validpgpkeys=('2CC8A0609AD2A479C65B6D5C8E8B898CBF2412F9') # Weng Xuetian <wengxt@gmail.com>

build(){
  cd $pkgname-$pkgver

  cmake -GNinja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=/usr/lib .
  ninja
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="$pkgdir" ninja install
}
